package com.ioc.profile;


import com.ioc.color.Blue;
import com.ioc.color.Color;
import com.ioc.color.Red;
import com.ioc.color.Yellow;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author cyt
 * @create 2020-08-01 14:33
 */
@Configuration
public class Profile {

    @org.springframework.context.annotation.Profile("test")
    @Bean
    public Red red() {
        return new Red();
    }

    @org.springframework.context.annotation.Profile("dev")
    @Bean
    public Blue blue() {
        return new Blue();
    }

    @org.springframework.context.annotation.Profile("prod")
    @Bean
    public Yellow yellow() {
        return new Yellow();
    }

    @Bean
    public Color color() {
        return new Color();
    }
}
